def search_table(table, row, column):
    return table[row - 1][column - 1]


def open_xl(filename):
    xl = open(filename)
    try:
        table = str.split(xl.read(), '\n')
    finally:
        xl.close()
    for i in range(len(table)):
        table[i] = str.split(table[i], ',')
    return table


def main():
    table = open_xl('xiaofei.csv')
    print('衣着消费：\n江西的为：{}，\n甘肃的为：{}。'.format(search_table(table, 16, 4), search_table(table, 30, 4)))


main()
